<html>
<link rel="stylesheet" href="style.css" type="text/css"/>
<script language='JavaScript' src='log4javascript.js'></script>
<script language='JavaScript' src='init_log4js.js'></script>
<script language='JavaScript' src='jquery-1.4.2.min.js'></script>
<script language='JavaScript' src='popup.js'></script>

<script language="JavaScript">
    <!--
    function doFocus() {
        //log.debug("doFocus: ");
        $("#query").focus();
    }
    //-->
    
    // initialization variable to trigger highlighting activations of result selector
    var isLoaded = false;
    
 // wait with init, till document is ready
 $(document).ready(function() {
    
    // keyboad entires
    $(document).keyup(function(event) {

        // key: 13 = enter
        if (event.keyCode == 13) {
            
            // here, the selected tab should be opened, example:
            // updatedtabid = parseInt($("tr.selected").attr("id"));
            // windowid = parseInt($("tr.selected").attr("wid"));
            // switchtab(updatedtabid,windowid);
            
        }

        // 27 = esc  the search poplup should be closed on escape key  
        if (event.keyCode == 27)
            window.close();

        // Arrow keys:  38 = arrow up, 40 = arrow down
        if (event.keyCode == 38)
        {
            // mark row as selected
            $("tr.selected:visible").removeClass('selected').prev(":visible").addClass('selected');
            
            if ($("tr.selected:visible").length == 0)
                $("tr:visible:first").addClass("selected");
        }
        if (event.keyCode == 40) {
            // mark row as selected
            $("tr.selected:visible").removeClass('selected').next(":visible").addClass('selected');
        
            if ($("tr.selected:visible").length == 0)
                $("tr:visible:last").addClass("selected");
        }
    }); // end of keybord entires
    
}); // end document init
</script>
<body onblur="javascript:window.close()" onload="doFocus()">


<!-- results -->

<div>
    <table id="table_example" border="0">
        <tbody>
        
        <form id="search">
        	<input id="query" type="text" name="query"/>
        	<input type="submit" onclick="doSearch()"/>
        	<!--<input type="submit"/>-->
        </form>
        
        <tr id="results"></tr>
        
        </tbody>
    </table>
</div>
<span class="footer">Make a SmartTabSearch <span style="font-style:italic; color:#CCCCCC;" >current $Revision$ - $Rev$</span></span> 

</body>
</html>
